3.356 \(\int \frac{x^2 (A+B x)}{\sqrt{a+c x^2}} \, dx\)

Optimal. Leaf size=81 \[ -\frac{\sqrt{a+c x^2} (4 a B-3 A c x)}{6 c^2}-\frac{a A \tanh ^{-1}\left (\frac{\sqrt{c} x}{\sqrt{a+c x^2}}\right )}{2 c^{3/2}}+\frac{B x^2 \sqrt{a+c x^2}}{3 c} \]

[Out]

(B*x^2*Sqrt[a + c*x^2])/(3*c) - ((4*a*B - 3*A*c*x)*Sqrt[a + c*x^2])/(6*c^2) - (a
*A*ArcTanh[(Sqrt[c]*x)/Sqrt[a + c*x^2]])/(2*c^(3/2))

_______________________________________________________________________________________

Rubi [A]  time = 0.14713, antiderivative size = 81, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 4, integrand size = 20, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.2 \[ -\frac{\sqrt{a+c x^2} (4 a B-3 A c x)}{6 c^2}-\frac{a A \tanh ^{-1}\left (\frac{\sqrt{c} x}{\sqrt{a+c x^2}}\right )}{2 c^{3/2}}+\frac{B x^2 \sqrt{a+c x^2}}{3 c} \]

Antiderivative was successfully verified.

[In]  Int[(x^2*(A + B*x))/Sqrt[a + c*x^2],x]

[Out]

(B*x^2*Sqrt[a + c*x^2])/(3*c) - ((4*a*B - 3*A*c*x)*Sqrt[a + c*x^2])/(6*c^2) - (a
*A*ArcTanh[(Sqrt[c]*x)/Sqrt[a + c*x^2]])/(2*c^(3/2))

_______________________________________________________________________________________

Rubi in Sympy [A]  time = 13.2786, size = 73, normalized size = 0.9 \[ - \frac{A a \operatorname{atanh}{\left (\frac{\sqrt{c} x}{\sqrt{a + c x^{2}}} \right )}}{2 c^{\frac{3}{2}}} + \frac{B x^{2} \sqrt{a + c x^{2}}}{3 c} - \frac{\sqrt{a + c x^{2}} \left (- 3 A c x + 4 B a\right )}{6 c^{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  rubi_integrate(x**2*(B*x+A)/(c*x**2+a)**(1/2),x)

[Out]

-A*a*atanh(sqrt(c)*x/sqrt(a + c*x**2))/(2*c**(3/2)) + B*x**2*sqrt(a + c*x**2)/(3
*c) - sqrt(a + c*x**2)*(-3*A*c*x + 4*B*a)/(6*c**2)

_______________________________________________________________________________________

Mathematica [A]  time = 0.0644596, size = 67, normalized size = 0.83 \[ \frac{\sqrt{a+c x^2} (c x (3 A+2 B x)-4 a B)-3 a A \sqrt{c} \log \left (\sqrt{c} \sqrt{a+c x^2}+c x\right )}{6 c^2} \]

Antiderivative was successfully verified.

[In]  Integrate[(x^2*(A + B*x))/Sqrt[a + c*x^2],x]

[Out]

(Sqrt[a + c*x^2]*(-4*a*B + c*x*(3*A + 2*B*x)) - 3*a*A*Sqrt[c]*Log[c*x + Sqrt[c]*
Sqrt[a + c*x^2]])/(6*c^2)

_______________________________________________________________________________________

Maple [A]  time = 0.008, size = 75, normalized size = 0.9 \[{\frac{Ax}{2\,c}\sqrt{c{x}^{2}+a}}-{\frac{aA}{2}\ln \left ( \sqrt{c}x+\sqrt{c{x}^{2}+a} \right ){c}^{-{\frac{3}{2}}}}+{\frac{{x}^{2}B}{3\,c}\sqrt{c{x}^{2}+a}}-{\frac{2\,Ba}{3\,{c}^{2}}\sqrt{c{x}^{2}+a}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  int(x^2*(B*x+A)/(c*x^2+a)^(1/2),x)

[Out]

1/2*A*x/c*(c*x^2+a)^(1/2)-1/2*A*a/c^(3/2)*ln(c^(1/2)*x+(c*x^2+a)^(1/2))+1/3*B*x^
2*(c*x^2+a)^(1/2)/c-2/3*B*a/c^2*(c*x^2+a)^(1/2)

_______________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \[ \text{Exception raised: ValueError} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((B*x + A)*x^2/sqrt(c*x^2 + a),x, algorithm="maxima")

[Out]

Exception raised: ValueError

_______________________________________________________________________________________

Fricas [A]  time = 0.335826, size = 1, normalized size = 0.01 \[ \left [\frac{3 \, A a c \log \left (2 \, \sqrt{c x^{2} + a} c x -{\left (2 \, c x^{2} + a\right )} \sqrt{c}\right ) + 2 \,{\left (2 \, B c x^{2} + 3 \, A c x - 4 \, B a\right )} \sqrt{c x^{2} + a} \sqrt{c}}{12 \, c^{\frac{5}{2}}}, -\frac{3 \, A a c \arctan \left (\frac{\sqrt{-c} x}{\sqrt{c x^{2} + a}}\right ) -{\left (2 \, B c x^{2} + 3 \, A c x - 4 \, B a\right )} \sqrt{c x^{2} + a} \sqrt{-c}}{6 \, \sqrt{-c} c^{2}}\right ] \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((B*x + A)*x^2/sqrt(c*x^2 + a),x, algorithm="fricas")

[Out]

[1/12*(3*A*a*c*log(2*sqrt(c*x^2 + a)*c*x - (2*c*x^2 + a)*sqrt(c)) + 2*(2*B*c*x^2
 + 3*A*c*x - 4*B*a)*sqrt(c*x^2 + a)*sqrt(c))/c^(5/2), -1/6*(3*A*a*c*arctan(sqrt(
-c)*x/sqrt(c*x^2 + a)) - (2*B*c*x^2 + 3*A*c*x - 4*B*a)*sqrt(c*x^2 + a)*sqrt(-c))
/(sqrt(-c)*c^2)]

_______________________________________________________________________________________

Sympy [A]  time = 9.95448, size = 94, normalized size = 1.16 \[ \frac{A \sqrt{a} x \sqrt{1 + \frac{c x^{2}}{a}}}{2 c} - \frac{A a \operatorname{asinh}{\left (\frac{\sqrt{c} x}{\sqrt{a}} \right )}}{2 c^{\frac{3}{2}}} + B \left (\begin{cases} - \frac{2 a \sqrt{a + c x^{2}}}{3 c^{2}} + \frac{x^{2} \sqrt{a + c x^{2}}}{3 c} & \text{for}\: c \neq 0 \\\frac{x^{4}}{4 \sqrt{a}} & \text{otherwise} \end{cases}\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate(x**2*(B*x+A)/(c*x**2+a)**(1/2),x)

[Out]

A*sqrt(a)*x*sqrt(1 + c*x**2/a)/(2*c) - A*a*asinh(sqrt(c)*x/sqrt(a))/(2*c**(3/2))
 + B*Piecewise((-2*a*sqrt(a + c*x**2)/(3*c**2) + x**2*sqrt(a + c*x**2)/(3*c), Ne
(c, 0)), (x**4/(4*sqrt(a)), True))

_______________________________________________________________________________________

GIAC/XCAS [A]  time = 0.275976, size = 82, normalized size = 1.01 \[ \frac{1}{6} \, \sqrt{c x^{2} + a}{\left ({\left (\frac{2 \, B x}{c} + \frac{3 \, A}{c}\right )} x - \frac{4 \, B a}{c^{2}}\right )} + \frac{A a{\rm ln}\left ({\left | -\sqrt{c} x + \sqrt{c x^{2} + a} \right |}\right )}{2 \, c^{\frac{3}{2}}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((B*x + A)*x^2/sqrt(c*x^2 + a),x, algorithm="giac")

[Out]

1/6*sqrt(c*x^2 + a)*((2*B*x/c + 3*A/c)*x - 4*B*a/c^2) + 1/2*A*a*ln(abs(-sqrt(c)*
x + sqrt(c*x^2 + a)))/c^(3/2)